#!/bin/bash

# $Header$
# Author: yang.jin@ebay.com


export PATH=/bin:/usr/bin

DNS_SERVERS_LIST="/etc/named/IT_DNS_SERVERS"

if [ ! -f $DNS_SERVERS_LIST ]; then
        echo -e "The configuration file \"$DNS_SERVERS_LIST\" does not exist."
        exit 2
fi

. $DNS_SERVERS_LIST


echo -e "\nIT Master DNS Servers:"
for m in `echo $DNS_PRIMARY_MASTER $DNS_PSEUDO_MASTERS`; do
	echo -e "$m\t\c"
	dig $m +short
done

echo -e "\nIT Slave DNS Servers:"
for s in `echo $DNS_SLAVES`; do
	echo -e "$s\t\c"
	dig $s +short
done
